Overview Clamps Packages CM Dictionary Clamps Dictionary Fomus
Next: svg->lines , Previous: subseqx , Up: S , Home: Overview

Clamps Dictionary

svg->browser

Function

(svg->browser svg-file &key (bar-lines t) (staff-systems t) (piano-roll nil) (scale 1) (timescale 1/32) (inverse nil) (reload t))

Display svg-file in the SVG Player Gui, located at <clamps-base-url>/svg-display.

Arguments

svg-file String naming the svg-file to display/play. The filename is interpreted relative to the <clamps-gui-root>/svg directory.
:bar-lines Boolean indicating whether to display barlines.
:staff-systems Boolean indicating whether to display staff systems.
:piano-roll Boolean indicating whether to display a piano roll.
:scale Positive Number denoting the zoom factor of the graphic.
:timescale Positive number denoting The timescale for playback.
:inverse 0 or 1 indicating inverse colors.

Example

(events
 (loop
   for i below 10
   collect (new midi :time (* 0.1 i) :keynum (between 60 72) :duration 0.1))
 (svg-gui-path "test.svg"))

(svg->browser "test.svg")

;; Then open a browser at http://127.0.0.1:54619/svg-display

Author: Orm Finnendahl

Created: 2025-02-18 Di 12:58

Validate